/**
 * @Author 12629
 * @Description：
 */
public class Test {
    public static void main(String[] args) {
        int a = 10;
        String str = "abcd";
        System.out.printf("%d\n",a);
        System.out.printf("%s\n",str);

        System.out.println("==============");
        System.out.println(a);
        System.out.println(str);
        System.out.println("=======去掉ln=不会换行的======");
        System.out.print(a);
        System.out.print(str);


    }
    public static void main11(String[] args) {
        String str = "123";
        int val = Integer.parseInt(str);
        System.out.println(val+1);
    }
    public static void main10(String[] args) {
        int a = 123;
        String ret = String.valueOf(a);
        System.out.println(ret);

        /*int a = 123;
        String ret = a+"";
        System.out.println(ret);*/
    }
    public static void main9(String[] args) {
        /*String str = "abcdef";
        //System.out.println(str);

        String str2 = "hello";

        System.out.println(str + str2);//这个加号 表示的 是  拼接
        */

        int a = 10;
        int b = 20;
        //a == 10
        System.out.println("a == " + a + " b == " + b);//字符串拼接一个数据  整体就是一个字符串
        System.out.println("a + b == " + (a + b));
        //System.out.println(a + b + "a + b == " );


        //char *p = "fsadfa";

    }
    public static void main8(String[] args) {
        /*int a = 10;
        long b = 20;
        int c = (int)(a + b);
        long d = a + b;*/

        byte a = 10;
        byte b = 20;
        //对于小于4个字节的运算  会先把小于4个字节的 提升为4个字节
        int c = a + b;
        byte c2 = (byte)(a + b);
        System.out.println(c);
    }
    public static void main7(String[] args) {
        byte a = (byte)128;
        System.out.println(a);

        /*boolean flg = (boolean)1;
        System.out.println(flg);*/
       /* int a = 10;
        long b = 20;
        a = (int)b;
        System.out.println(a);*/
    }
    public static void main6(String[] args) {
        //2个字节
        char ch = 97;
        System.out.println(ch);

        char ch2 = '高';
        System.out.println(ch2);

        System.out.println(Character.MAX_VALUE);
        System.out.println(Character.MIN_VALUE);
    }

    public static void main5(String[] args) {
        float f = 12.5f;
        System.out.println(f);
        //99.99%  ->

    }
    public static void main4(String[] args) {
        //8个字节
        double d = 12.5;
        System.out.println(d);
        System.out.println(Double.MIN_VALUE);
        System.out.println(Double.MAX_VALUE);
        //符号位    指数位   尾数 IEE754标准

        int a = 1;
        int b = 2;
        System.out.println(a*1.0/b);

        double num = 1.1;
        System.out.println(num * num);//1.21

        //精确到小数点后几位

    }
    public static void main3(String[] args) {
        //1个字节  8个比特位    7个比特位
        byte a = 10;
        System.out.println(a);
        System.out.println(Byte.MIN_VALUE);
        System.out.println(Byte.MAX_VALUE);
    }
    public static void main2(String[] args) {
        //2个字节
        Short a = 10;
        System.out.println(a);
        System.out.println(Short.MAX_VALUE);
        System.out.println(Short.MIN_VALUE);
    }
    public static void main1(String[] args) {
        //8个字节   64个比特位
        long d = 10L;
        System.out.println(d);
        System.out.println(Long.MAX_VALUE);
        System.out.println(Long.MIN_VALUE);
    }

    public static void func(String[] args) {
        final int a ;
        a = 1;
        System.out.println(a);

        System.out.println(Integer.MAX_VALUE);
        System.out.println(Integer.MIN_VALUE);

        //Integer i = 100;//包装类

        int ii = 2147483647;
        System.out.println(ii);
    }
}
